package net.gxtvsgwt.client.demo.type;

import net.gxtvsgwt.client.demo.BaseDemo;

import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.Widget;

public class ListBoxDemo extends BaseDemo {

	@Override
	public Widget createGxt() {
		com.extjs.gxt.ui.client.widget.form.SimpleComboBox<String> listBox = new com.extjs.gxt.ui.client.widget.form.SimpleComboBox<String>();
		for (int i = 0; i < dataSize; i++) {
			listBox.add("test" + i);
		}
		listBox.setForceSelection(true);
		listBox.setLazyRender(false);
		return listBox;
	}

	@Override
	public Widget createGwt() {
		ListBox listBox = new ListBox();
		for (int i = 0; i < dataSize; i++) {
			listBox.addItem("test" + i);
		}
		return listBox;
	}

	@Override
	public String getName() {
		return "ListBox";
	}
}
